package com.zb.zeus.system.api;

import com.zb.zeus.common.core.domain.R;
import com.zb.zeus.system.api.domain.dto.CheckSmsCodeDTO;
import com.zb.zeus.system.api.domain.dto.GetSmsCodeDTO;
import com.zb.zeus.system.api.factory.RemoteSmsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 短信校验
 * 
 * @author liangfan
 * @date 2021/07/14 19:51
 **/
@FeignClient(contextId = "remoteSmsService",
        value = "${feign.ref.service.zeus-system:zeus-system}",
    fallbackFactory = RemoteSmsFallbackFactory.class)
public interface RemoteSmsService {

    @PostMapping("/sms/getSmsCode")
    R getSmsCode(@Valid @RequestBody GetSmsCodeDTO getSmsCodeDTO);

    @PostMapping("/sms/checkSmsCode")
    R checkSmsCode(@Valid @RequestBody CheckSmsCodeDTO checkSmsCodeDTO);
}
